public class Course {
    // 属性
    private String courseID;
    private String courseName;
    private String courseType;
    private int courseHour;
    private double credit;

    // 构造方法
    public Course(String courseID, String courseName, String courseType, int courseHour, double credit) {
        this.courseID = courseID;
        this.courseName = courseName;
        this.courseType = courseType;
        this.courseHour = courseHour;
        this.credit = credit;
    }

    // Getter 和 Setter 方法
    public String getCourseID() {
        return courseID;
    }

    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public int getCourseHour() {
        return courseHour;
    }

    public void setCourseHour(int courseHour) {
        this.courseHour = courseHour;
    }

    public double getCredit() {
        return credit;
    }

    public void setCredit(double credit) {
        this.credit = credit;
    }

    // toString 方法
    @Override
    public String toString() {
        return "Course{" +
                "courseID='" + courseID + '\'' +
                ", courseName='" + courseName + '\'' +
                ", courseType='" + courseType + '\'' +
                ", courseHour=" + courseHour +
                ", credit=" + credit +
                '}';
    }

    // 打印课程信息
    public static void printCourseInfo(Course course) {
        System.out.println(course.toString());
        System.out.println("Course ID: " + course.getCourseID());
        System.out.println("Course Name: " + course.getCourseName());
        System.out.println("Course Type: " + course.getCourseType());
        System.out.println("Course Hour: " + course.getCourseHour());
        System.out.println("Credit: " + course.getCredit());
    }
}